package com.wugenqiang.project.inventory.service.impl;

import com.wugenqiang.constant.ParamConstant;
import com.wugenqiang.project.inventory.dao.WarehouseMapper;
import com.wugenqiang.project.inventory.pojo.Warehouse;
import com.wugenqiang.project.inventory.service.IWarehouseService;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

/**
 * @Classname OutofwareServiceImpl
 * @Description TODO
 * @Date 2019/3/8 16:19
 * @Created by WuGenQiang//fighting!!
 */
@Service
public class wareServiceImpl implements IWarehouseService {

    private static final Logger LOGGER = LoggerFactory.getLogger(wareServiceImpl.class);

    @Resource
    private WarehouseMapper warehouseMapper;

    @Override
    public String addGoodsInfo(Warehouse warehouse) {
        this.warehouseMapper.addGoodsInfo(warehouse);
        return ParamConstant.INSERT_SUCCESS;
    }

    @Override
    public Warehouse queryGoodsById(Integer id) {
        return this.warehouseMapper.queryGoodsById(id);
    }

    @Override
    public Warehouse queryGoodsByIdentifier(String identifier) {
        return this.warehouseMapper.queryGoodsByIdentifier(identifier);
    }

    @Override
    public List<Warehouse> queryAllGoods() {
        return this.warehouseMapper.queryAllGoods();
    }

    @Override
    public Integer updateGoodsInfo(Warehouse warehouse) {
        return this.warehouseMapper.updateGoodsInfo(warehouse);
    }
}
